import socket
HOST=''
POST=10000
sk=socket.socket(socket.AF_INET,socket.SOCK_STREAM)
sk.bind((HOST,POST))#地址与端口绑定
sk.listen(1)#监听
conn,address=sk.accept()
print('跑男A在服务器端',address)
while True:
    data=conn.recv(1024)
    print('获取跑男B的信息：',data.decode('utf_8'))
    if not data:
        break
    conn.sendall(data)
conn.close()